package com.zhf;

import java.rmi.Remote;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

/**
 * @author: 曾鸿发
 * @create: 2021-12-28 14:27
 * @description：
 **/
public class CustomerMain {

    public static void main(String[] args) throws Exception{
        // 注册中心
        Registry registry = LocateRegistry.getRegistry(999);
        // 发现服务
        SayService sayService = (SayService) registry.lookup("sayService");

        // 调用服务
        sayService.say("小舞");
        System.out.println();
    }
}
